package com.codi.jobservice.job;

import com.codi.base.spring.SpringContextHolder;
import com.codi.bus.core.job.FundBasicJobService;
import lombok.extern.slf4j.Slf4j;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;

/**
 * 获取推荐基金
 *
 * @author shi.pengyan
 * @version 1.0 2017-10-23 10:03
 * @since 1.0
 */
@Slf4j
@DisallowConcurrentExecution
public class RefreshRecommendedFundJob extends QuartzJobBean {

    @Override
    protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
        log.info("query recommended fund job");

        FundBasicJobService fundBasicJobService = SpringContextHolder.getBean(FundBasicJobService.class);
        fundBasicJobService.refreshRecommendedFund();
    }
}
